public class NoEnoughPapersException extends Exception {
    private final String studentName;
    private final int expectedCount;
    private final int availableCount;

    public NoEnoughPapersException(String studentName, int expectedCount, int availableCount) {
        super(String.format("学生 %s 希望选论文 %d 篇，但目前只有 %d 篇可选", 
                studentName, expectedCount, availableCount));
        this.studentName = studentName;
        this.expectedCount = expectedCount;
        this.availableCount = availableCount;
    }

    public String getStudentName() {
        return studentName;
    }

    public int getExpectedCount() {
        return expectedCount;
    }

    public int getAvailableCount() {
        return availableCount;
    }
}    